<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Welcome-test</title>
    <script src="jquery-easyui-1.9.10/jquery.min.js"></script>
    <script src="jquery-easyui-1.9.10/jquery.easyui.min.js"></script>
    <link rel="stylesheet" href="jquery-easyui-1.9.10/themes/default/easyui.css">
    <link rel="stylesheet" href="jquery-easyui-1.9.10/themes/icon.css">
    <script src="jquery-easyui-1.9.10/locale/easyui-lang-zh_CN.js"></script>
    <script>
        $(function () {
            $('#dd').draggable({
                //拖拽代理对象
                proxy: "clone",
                //拖动事件，将拖动的元素限制到父元素中
                onDrag: function (e) {
                    //获取被拖动的元素,然后对获取的元素进行处理
                    var d = e.data()
                },
                handle: '#titleId'
            });
        });
    </script>
</head>
<body>
<div id="dd" style="width:300px;height:300px;">
    <!--再标题上才能够拖动-->
    <div id="titleId" style="background:#ccc;">标题</div>
</div>
</body>
</html>